#!/bin/bash
startDate=20130118

for i in `seq 0 0`
do
  date=`date -d "$startDate +$i day " "+%Y-%m-%d"`
  echo "call sp_CalcOrderReport('$date',1);"
  mysql -uroot -pmysql -h10.61.13.99 monitor -e "call sp_CalcOrderReport('$date',1);"
  mysql -uroot -pmysql -h10.61.13.99 monitor -e 'insert into ksdailyreports select date(StartTime) as UPTIME,ABGROUP,CLASS,TYPE,COUNT,FEE from ksdailyreport;'
done
